package org.jivesoftware.smack.filter;

import org.jivesoftware.smack.packet.Packet;

public class PacketTypeFilter
  implements PacketFilter
{
  Class<? extends Packet> packetType;

  public PacketTypeFilter(Class<? extends Packet> paramClass)
  {
    if (!Packet.class.isAssignableFrom(paramClass))
      throw new IllegalArgumentException("Packet type must be a sub-class of Packet.");
    this.packetType = paramClass;
  }

  public boolean accept(Packet paramPacket)
  {
    return this.packetType.isInstance(paramPacket);
  }

  public String toString()
  {
    return "PacketTypeFilter: " + this.packetType.getName();
  }
}

/* Location:           D:\hygieia\userclient\common\libs\easemobchat_2.1.8.jar
 * Qualified Name:     org.jivesoftware.smack.filter.PacketTypeFilter
 * JD-Core Version:    0.6.1
 */